// 指令集
const directives = {
  focus: {
    mounted: (el) => el.focus(),
  },
  color: (el, binding) => {
    el.style.background = binding.value
  }
}

export default {
  install(Vue) {
    Object.keys(directives).forEach((key) => {
      Vue.directive(key, directives[key])
    })
  },
}